package com.label.Model.Query;

import com.label.Model.Common.Validation.Del;
import com.label.Model.Common.Validation.Get;
import com.label.Model.Common.Validation.Save;
import com.label.Model.Common.Validation.Update;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
public class RoleQuery {

    @NotNull(message = "ID不为空！",groups = {Update.class, Get.class, Del.class})
    private Long id;

    @NotBlank(message = "角色名字不为空！",groups = {Save.class})
    private String name;

    private String charge;

    @NotEmpty(message = "权限不为空！",groups = {Save.class})
    private List<Long> permissions;

}
